<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>相册管理</title>
	<link href="${cpath}/css/youlin.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<!--外套 start -->
<div class="wrap">
  <!--页首 start -->
	<%@ include file="/menu.jsp"%>
  <!--页首 end -->  
  
  <!--导航面包屑 start -->
  <div class="breadCrumb">
  <div class="breadCrumbNav">当前位置：<a href="${cpath}/users.do?action=main">我的主页</a>
  <c:if test="${theForm.groupID != 99999999 && theForm.groupID > 0}"> 
   >> <a href="${cpath}/group_get/groupID_${theForm.groupID}.html">部落</a>
  </c:if>
  </div>
	<%@ include file="/navf.jsp"%> 
 </div> 
  <!--导航面包屑 end -->
  
  <!--主体 start -->
 <div class="body">
 
  <div class="hotBox1">  
    <div class="hotBox1-left">
      <c:if test="${theForm.groupID != 99999999 && theForm.groupID > 0}">  
	  <a href="${cpath}/group_get/groupID_${theForm.groupID}.html"><img src="${cpath}/${myfn:getGroupPic(theForm.groupID)}"  width="75" height="75" class="shequ icon user_icon_2"></a>
      <p class="nav"><a href="${cpath}/group_get/groupID_${theForm.groupID}.html">${myfn:getGroupName(theForm.groupID)}</a> &gt; <a >相册管理</a></p>
	</c:if>
	<c:if test="${theForm.groupID == 99999999 || theForm.groupID == 0}">
	  <a href="${cpath}/users_home/userID_${theForm.userID}.html"><img src="${cpath}/${myfn:getUserPic(theForm.userID)}" width="75" height="75" class="shequ icon user_icon_2"></a>
      <p><b><a href="${cpath}/users_home/userID_${theForm.userID}.html">${myfn:getUserNick(theForm.userID)}</a></b></p>
      <p>相册管理</p>
	</c:if>
    </div>
    <div class="hotBox1-right">
      <p><a href="javascript:history.go(-1);"><img src="${cpath}/images/icon_32.gif" width="137" height="25" /></a></p>
      <p>&nbsp;</p>    
    </div>
  </div> 
  
 <div class="left-Box6">
	<h3 class="nav"><a >相册管理</a></h3>

  <div class="left-Box6-content">
   <div class="left-Box6-content-inner">   
	<form action="${cpath}/galbum.do" name="theForm"  method="post" enctype="multipart/form-data" class="frmAddTopic" >
		<p><label>相册名称:</label>
			<input type="text" name='albumname' value='${theForm.albumname}' maxlength="100" class="long"/></p>
		<p><label>说&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;明:</label>
			<textarea name="albuminfo" rows="5" cols="65" >${theForm.albuminfo}</textarea></p>
		<p><label>隐私保护:</label>
			<tag:ARRAY  id="protect" name="protect" options="<%=ValueMaping.USERSET_TYPE%>" value='${theForm.protect}'/></p>
       <p class="btn">
       <a href="javascript:doConfirm();"><img src="${cpath}/images/icon_09.gif" /></a> 
       <a href="javascript:history.go(-1);"><img src="${cpath}/images/icon_33.gif" /></a>
       </p>
		<!--隐藏域-->
		<input type="hidden" name='userID'	 value='${theForm.userID}'/>
		<input type="hidden" name='galbumID' value='${theForm.galbumID}'/>
		<input type="hidden" name='groupID'	 value='${theForm.groupID}'/>
		<input type="hidden" name='delflg'	 value='${theForm.delflg}'/>
		<input type="hidden" name='afolder'	 value='${theForm.afolder}'/>
		<input type="hidden" name='num'		 value='${theForm.num}'/>
		<input type="hidden" name='ctime'	 value='${theForm.ctime}'/>
		<input type="hidden" name='action'	 value='${theForm.action}'/>     
     </form>
      </div>
   <div class="clearFloat"></div>
  </div>
</div>
  
    <div class="clearFloat"></div>
 </div> 
 <!--主体 end -->
 
 
 <!--页脚 start -->
	<%@ include file="/foot.jsp"%>
 <!--页脚 end --> 
</div>
<!--外套 end -->

</body>
</html>
<!---->
<script>
    /**
     * 检查项目资料维护
     */
	function doConfirm()
	{
		var form = document.theForm;
		var albumname = form['albumname'];
		var action = form['action'];
		var groupID = form['groupID'];

		if(albumname.value == null||albumname.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
  		{
			alert('相册名称不能为空');
			albumname.select();
			return ;
		}
		form.submit();
	}
	/**
   * 根据具体请求设置各个组件状态	
   */
  function showState()
	{
		var action = '${theForm.action}';
		var form = document.theForm;		
		if(action == 'detail')
		{    
			document.getElementById("back").style.display = "none";
		}
		else if(action == 'modifyPage' || action == 'update')
		{
			form['action'].value = 'update';
		}else{

			form['action'].value = 'add';
		}
	}
	showState();
</script>
